﻿@inherits BAdminTemplateBase
<div class="sidebar" style="width:220px;background-color:#20222A;border-right: solid 1px #e6e6e6;">
    <div style="height:50px;vertical-align:middle;text-align:center;line-height:50px;color:rgba(255,255,255,.7);border-right: solid 1px #e6e6e6;">Blazui BlazAdmin 文档</div>
    <BMenu Mode="@MenuMode.Vertical" @bind-ActiveItem="@CurrentMenu" DefaultActive="@defaultMenuIndex" BackgroundColor="#20222A" ActiveTextColor="#FFFFFF" TextColor="rgba(255,255,255,.7)" HoverColor="#434A50">
        @foreach (var menu in Menus)
        {
            if (menu.Children != null && menu.Children.Any())
            {
                <BSubMenu Label="@menu.Label">
                    @foreach (var children in menu.Children)
                    {
                        <BMenuItem Route="@children.Route" OnRouteChanging="OnRouteChanging" Index="@children.Name" Model="@children">@children.Label</BMenuItem>
                    }
                </BSubMenu>
            }
            else
            {
                <BMenuItem Route="@menu.Route" OnRouteChanging="OnRouteChanging" Index="@menu.Name" Model="@menu">@menu.Label</BMenuItem>
            }
        }
    </BMenu>
</div>

<div class="main">
    <BTab Type="@TabType.Card" IsClosable="true" ActiveTabName="@ActiveTabName">
        <BTabPanel DataSource="Tabs" Content="x=>x.Content" Title="x=>x.Title" Name="x=>x.Name"></BTabPanel>
    </BTab>
</div>